#@adminLayout() #define main()
<link href="#(ctx)/static/css/style.css" rel="stylesheet"/>
<body class="white-bg" style="width: 100%;background: none">
<div class="container wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <form class="form-horizontal m-t" id="commentForm">
            <div class="form-group">
                <label class="col-sm-2 control-label">节点名：</label>
                <div class="col-sm-4">
                    <input type="hidden" name="id" value="#(node_id)"/>
                    <input name="name" class="form-control" value="#(node.name)" readonly>
                </div>
                <label class="col-sm-2 control-label">类型：</label>
                <div class="col-sm-4">
                    <input name="shape" class="form-control" value="#(node.shape)" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" >处理发回：</label>
                <div class="col-sm-4">
                    <select name="deal_back" class="form-control">
                        <option value="0">不允许发回</option>
                        <option value="1">发回开始</option>
                        <option value="2">发回上一步</option>
                        <option value="3">发回任意</option>
                    </select>
                </div>
                <label class="col-sm-2 control-label" title="当前节点未审批时，是否允许上一审批人撤回">是否允许撤回：</label>
                <div class="col-sm-4">
                    <select name="is_back" class="form-control">
                        <option value="0">否</option>
                        <option value="1">是</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">处理类型：</label>
                <div class="col-sm-4">
                    <select name="deal_type" id="deal_type" class="form-control"
                            onchange="dealTypeSelect(this.options[this.options.selectedIndex].value)">
                        <option value="0">单人审批</option>
                        <option value="1">会签审批</option>
                        <option value="2">审批占比</option>
                    </select>
                </div>
                <label class="col-sm-2 control-label" title="比例取整数，四舍五入">处理比例(%)：</label>
                <div class="col-sm-4">
                    <input type="number" class="form-control" name="deal_type_rate" id="deal_type_rate" value="50" disabled/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">节点属性：</label>
                <div class="col-sm-4">
                    <select name="deal_attr" class="form-control">
                        <option value="0">自动节点</option>
                        <option value="1">人工节点</option>
                    </select>
                </div>
                <label class="col-sm-2 control-label">节点参与组：</label>
                <div class="col-sm-4">
                    <select name="by_group" class="form-control">
                        <option value="0">无【自批】</option>
                        #for(item : group)
                        <option value="#(item.value)">#(item.name)</option>
                        #end
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">处理页面：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="detail_url" maxlength="40" placeholder="可空"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">APP端页面：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="app_url" maxlength="40" placeholder="可空"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">处理类：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="deal_action" maxlength="40" placeholder="可空"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" title="过滤下一节点范围的人员">节点人员过滤：</label>
                <div class="col-sm-4">
                    <select name="is_filter" class="form-control">
                        <option value="0">全部人员</option>
                        #for(item : filter)
                        <option value="#(item.value)">#(item.name)</option>
                        #end
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" title="">节点转移：</label>
                <div class="col-sm-4">
                    <a class="form-control" style="border: none;color: #1a7bb9; text-underline: #1a7bb9" href="javascript:void(0)" onclick="openCond()">设计节点转移条件及主表赋值</a>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    var wf_id='#(wf_id)';
    var node_id='#(node_id)';
    var prefix ="#(ctx)/jwflow";
    $(function(){

        $('#commentForm').loadForm(prefix+'/getProp?id='+node_id);

    });

    function dealTypeSelect(deal_type)
    {
        if(deal_type=="2")
        {
            $("#deal_type_rate").removeAttr('disabled');
        }
        else
        {
            $("#deal_type_rate").attr('disabled',true);
        }
    }

    function submitHandler()
    {
        var url=prefix+"/saveProp";
        var data=$('#commentForm').serializeArray();
        $.operate.post(url,data);
    }

    function openCond()
    {

    }
</script>
</body>
#end